import axios from 'axios'

// const instance = axios.create({
//   baseURL: 'http://localhost:3000/'
// })

axios.interceptors.request.use((config) => {
  config.headers.authorization = sessionStorage.getItem('token')
  return config;
}, () => {
  return Promise.reject()
})

axios.interceptors.response.use((response) => {
  if (response.status === 200) {
    return response.data
  }

}, (err) => {

})

export default axios